// pages/lifecircle/lifecircle.js
Page({

    /**
     * Page initial data
     */
    data: {
        "title": ""
    },

    myTap: function (params) {
        console.log("Click Now"),
        console.log(params),
        console.log(params.currentTarget.dataset.title)
        var dataTitle = params.currentTarget.dataset.title

        // this.data.title = dataTitle 这种方式无法改变 data 中变量的值
        // 需要用以下方式
        this.setData ({
            name: dataTitle
        })
    },

    /**
     * Lifecycle function--Called when page load
     */
    onLoad: function (options) {
        console.log("onLoad")
    },

    /**
     * Lifecycle function--Called when page is initially rendered
     */
    onReady: function () {
        console.log("onReady")
    },

    /**
     * Lifecycle function--Called when page show
     */
    onShow: function () {
        console.log("onShow")
    },

    /**
     * Lifecycle function--Called when page hide
     */
    onHide: function () {

    },

    /**
     * Lifecycle function--Called when page unload
     */
    onUnload: function () {

    },

    /**
     * Page event handler function--Called when user drop down
     */
    onPullDownRefresh: function () {
        console.log("Pull Down Refresh")
    },

    /**
     * Called when page reach bottom
     */
    onReachBottom: function () {
        console.log("Get Bottom")
    },

    /**
     * Called when user click on the top right corner to share
     */
    onShareAppMessage: function () {

    }
})